package com.dwsoft.mapper;

import com.dwsoft.pojo.WordTempleteDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

/**
 * @author sqw
 * @version 1.0
 * @description word模板配置持久层
 * @ClassName IWordTempleteMapper
 * @Date 2020/8/4
 * @since jdk1.8
 */
@Mapper
@Repository
public interface IWordTempleteMapper {

    @Select("select t.id," +
            "t.templete_name templeteName,\n" +
            "t.create_time   createTime,\n" +
            "t.create_author createAuthor,\n" +
            "t.create_desc   createDesc," +
            "templete_xml templeteXml\n" +
            "  from cfg_word_templete t where t.id=#{id}")
    public WordTempleteDO getTemplete(@Param("id") String id) throws DataAccessException;
}
